/*
 * Copyright 2010-2016 the original author or authors.
 * 
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 文件：test.UrmWebmqmessage.java
 * 日 期：Tue Dec 18 15:34:33 CST 2012
 */
package test;

import java.io.Serializable;
import java.sql.Timestamp;
import org.uorm.orm.annotation.ClassMapping;
import org.uorm.orm.annotation.FieldMapping;

/**
 *
 * this file is generated by the uorm pojo tools.
 *
 * @author <a href="mailto:xunchangguo@gmail.com">郭训常</a>
 * @version 1.0.0
 */
@ClassMapping(tableName = "URM_WEBMQMESSAGE", keyGenerator = "uuid")
public class UrmWebmqmessage implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public static String PROP_CHANNEL_CODE = "channelCode";
	public static String PROP_INVOKE_TIME = "invokeTime";
	public static String PROP_MSG_BODY = "msgBody";
	public static String PROP_MSG_ID = "msgId";
	public static String PROP_MSG_TYPE = "msgType";
	public static String PROP_SYS_CODE = "sysCode";
	public static String PROP_TOPIC = "topic";
	
	//primary key field of msgId
	@FieldMapping(columnName = "MSG_ID", columnType = 12, primary = true)
	private String msgId;
	@FieldMapping(columnName = "CHANNEL_CODE", columnType = 12)
	private String channelCode;
	@FieldMapping(columnName = "INVOKE_TIME", columnType = 93)
	private Timestamp invokeTime;
	@FieldMapping(columnName = "MSG_BODY", columnType = 2005)
	private byte[] msgBody;
	@FieldMapping(columnName = "MSG_TYPE", columnType = 2)
	private Integer msgType;
	@FieldMapping(columnName = "SYS_CODE", columnType = 12)
	private String sysCode;
	@FieldMapping(columnName = "TOPIC", columnType = 12)
	private String topic;
	
	public UrmWebmqmessage() {
		super();
	}

	public UrmWebmqmessage(String msgId) {
		this.msgId = msgId;
	}

	public UrmWebmqmessage(Integer msgType, String sysCode, String topic) {
		this.msgType = msgType;
		this.sysCode = sysCode;
		this.topic = topic;
	}

	/**
	 * @return the channelCode
	 */
	public String getChannelCode() {
		return this.channelCode;
	}
	
	/**
	 * @param channelCode the channelCode to set
	 */
	public void setChannelCode(String value) {
		this.channelCode = value;
	}

	/**
	 * @return the invokeTime
	 */
	public Timestamp getInvokeTime() {
		return this.invokeTime;
	}
	
	/**
	 * @param invokeTime the invokeTime to set
	 */
	public void setInvokeTime(Timestamp value) {
		this.invokeTime = value;
	}

	/**
	 * @return the msgBody
	 */
	public byte[] getMsgBody() {
		return this.msgBody;
	}
	
	/**
	 * @param msgBody the msgBody to set
	 */
	public void setMsgBody(byte[] value) {
		this.msgBody = value;
	}

	/**
	 * @return the msgId
	 */
	public String getMsgId() {
		return this.msgId;
	}
	
	/**
	 * @param msgId the msgId to set
	 */
	public void setMsgId(String value) {
		this.msgId = value;
	}

	/**
	 * @return the msgType
	 */
	public Integer getMsgType() {
		return this.msgType;
	}
	
	/**
	 * @param msgType the msgType to set
	 */
	public void setMsgType(Integer value) {
		this.msgType = value;
	}

	/**
	 * @return the sysCode
	 */
	public String getSysCode() {
		return this.sysCode;
	}
	
	/**
	 * @param sysCode the sysCode to set
	 */
	public void setSysCode(String value) {
		this.sysCode = value;
	}

	/**
	 * @return the topic
	 */
	public String getTopic() {
		return this.topic;
	}
	
	/**
	 * @param topic the topic to set
	 */
	public void setTopic(String value) {
		this.topic = value;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object o) {
		if ((o == null) || !(o instanceof UrmWebmqmessage)) {
			return false;
		}
		UrmWebmqmessage other = (UrmWebmqmessage)o;
		if (null == this.msgId) {
			if (other.msgId != null)
				return false;
		} else if (!this.msgId.equals(other.msgId))
			return false;
		return true;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((msgId == null) ? 0 : msgId.hashCode());
		return result;
	}
	
}